package vsmg.sgip.codec;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

/**
 *
 *
 * @version 1.0 2013-6-22
 * @author Aaron
 */
public class SGIPProtocolCodecFactory implements ProtocolCodecFactory {

	private ProtocolDecoder	decoder	= null;

	private ProtocolEncoder	encoder	= null;

	public SGIPProtocolCodecFactory(ProtocolEncoder encoder, ProtocolDecoder decoder) {

		this.decoder = decoder;
		this.encoder = encoder;
	}

	@Override
	public ProtocolDecoder getDecoder(IoSession session) throws Exception {

		return this.decoder;
	}

	@Override
	public ProtocolEncoder getEncoder(IoSession session) throws Exception {

		return this.encoder;
	}

}
